package com.witdata.common.exception;

import com.witdata.common.domain.Status;
import lombok.Getter;
import org.slf4j.Logger;


/**
 * DATETIME: 2023/12/2 12:32
 * USER: admin
 **/
@Getter
public class GlobalException extends RuntimeException {

    private final Integer code;
    private Logger logger = null;

    public GlobalException(Status status) {
        super(status.getMsg());
        this.code = status.getCode();
    }

    public GlobalException(Status status, Logger logger) {
        super(status.getMsg());
        this.logger = logger;
        this.code = status.getCode();
    }

}
